home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / keystuff.arc / KYSTFDEM.C < prev    next >
Text File  |  1990-01-08  |  778b  |  48 lines

  1.  
  2. void keystuff(char *cmd)
  3. {register unsigned a=0;
  4.  register unsigned x=0;
  5.  
  6.  pokeb(0,0x41a,0x001e);
  7.  pokeb(0,0x41c,0x001e);
  8.  
  9.  while (cmd[a])
  10.  {
  11.    poke(0,0x41e+a*2,cmd[a]);
  12.    a++;
  13.  }
  14.  pokeb(0,0x41a,0x001e);
  15.  pokeb(0,0x41c,0x001e+a*2);
  16. }
  17.  
  18.  
  19. main(int argc, char *argv[])
  20. {int totargs  = 1;
  21.  int argchars = 0;
  22.  int totchars = 0;
  23.  char cmd[17];
  24.  char c[20];
  25.  
  26.  
  27.  while((totargs<argc) & (totchars < 15))
  28.   {
  29.     argchars=0;
  30.     while((totchars <15) & (argv[totargs][argchars]!=0))
  31.     {
  32.       if(argv[totargs][argchars]=='~') cmd[totchars]=13;
  33.       else cmd[totchars] = argv[totargs][argchars];
  34.       totchars++;
  35.       argchars++;
  36.     }
  37.     cmd[totchars]=' ';
  38.     totchars++;
  39.     totargs++;
  40.  }
  41.  
  42.  cmd[totchars-1]=0;
  43.  
  44.  
  45.   keystuff(cmd);
  46.  
  47. }
  48.